package com.tts.superstar.Tools;

import android.app.Activity;

import com.tts.superstar.View.BaseActivity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by LiuZhiHao Cotter on 2019/4/17.
 */
public class ActivityList {
    static List<BaseActivity>  activityList= new ArrayList<>();

    public static void addActivity(BaseActivity activity){
        activityList.add(activity);
    }

    public static void removeActivity(BaseActivity activity){
        activityList.remove(activity);
    }

    public static List<BaseActivity> showActivity(){
        return activityList;
    }

    public static void finishAll(){
        for (BaseActivity activity : activityList){
            activity.finish();
        }
    }
}
